package com.yu.DAO;

import com.yu.POJO.Student;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: LittleFisher
 * @Date: 2021/05/23/16:07
 * @Description:
 */
public interface StudentDao {

        public int addStudent(Student student);

        public int delUser(int id);

        public int updateStu(Student stu);

        public Student findStuByID(int id);

        public List<Student> findAllStu(@Param("start")int start,@Param("end")int end);

        public List<Student> findAllStuWithClazz(@Param("start")int start,@Param("end")int end,@Param("clazz_id")int clazz_id);

        public int updateStuPassword(@Param("id")int id, @Param("password")String password);


        public Student findStuBySno(String sno);


        public int getStuTotal();

        public int getClazzTotal(int clazz_id);

        public int findStuIDBySno(String  name);

        public String isSno(String sno);

        public List<Student> getStuByNameOrSno(String name);

        public List<Student> getStuByClazz_id(int clazz_id);

}
